﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using VietTrips.Domain.Models;

namespace VietTrips.WebUI.Areas.Management.Models
{
    public class CreateActivityModel
    {
        public CreateActivityModel()
        {
        }

        public CreateActivityModel(int activityId, int? placeId, string activityName, int? featuredImageId, string description, bool publicity, DateTime lastModified, bool isDeleted)
        {
            ActivityId = activityId;
            PlaceId = placeId;
            ActivityName = activityName;
            FeaturedImageId = featuredImageId;
            Description = description;
            Publicity = publicity;
            LastModified = lastModified;
            IsDeleted = isDeleted;
        }

        public int ActivityId { get; set; }

        public int? PlaceId { get; set; }

        [Required]
        [StringLength(50, ErrorMessage = "Tên hoạt động không quá 50 ký tự.")]
        [DisplayName("Tên hoạt động")]
        public string ActivityName { get; set; }

        public int? FeaturedImageId { get; set; }

        [StringLength(1000, ErrorMessage = "Mô tả hoạt động không quá 1000 ký tự.")]
        [DisplayName("Mô tả hoạt động")]
        public string Description { get; set; }

        [DisplayName("Chia sẻ")]
        public bool Publicity { get; set; }

        public DateTime LastModified { get; set; }

        public bool IsDeleted { get; set; }

        [DisplayName("Tên địa điểm")]
        public String PlaceName { get; set; }

        [DisplayName("Mô tả")]
        public String PlaceDescription { get; set; }

        [DisplayName("Địa chỉ")]
        public String PlaceAddress { get; set; }

        [DisplayName("Khu vực địa điểm")]
        public String PlaceCity { get; set; }

        public Activity ToActivity()
        {
            return new Activity()
            {
                ActivityId = this.ActivityId,
                ActivityName = this.ActivityName,
                Description = this.Description,
                Publicity = this.Publicity
            };
        }
    }
}